package com.example.order;

import com.example.order.config.MyRule;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
//@RibbonClient(name="userservice",configuration = MyRule.class) //可在配置类写
@EnableFeignClients(basePackages = {"com.example.feign.clients"})
//@EnableDiscoveryClient//could be omitted
//同一个应用只能拥有一种feign调用方式
public class OrderMain {
    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(OrderMain.class, args);
    }
}
